<?php $this->title = "工具书之家"; ?>
<style>
    table {
        border: solid 1px #ccc;
    }

    tr td {
        border: solid 1px #ccc;
        padding: 10px;
    }

    .mtop50 {
        margin-top: 50px;
    }
</style>
<?php foreach ($data as $category1): ?>
    <div style="margin-top: 10px;">
        <div style="width: 100%;height: 30px;line-height: 30px;background: #EAF9BD;font-size: 25px">
            <?php echo $category1['name'] ?? '' ?>
        </div>
        <?php if ($category1['son']): ?>
            <div>
                <?php foreach ($category1['son'] as $category2): ?>
                    <div style="width: 25%;padding: 5px;border: solid 1px #ccc;float: left;margin-top: 10px">
                        <div style="width: 100%;height: 30px;line-height: 30px;text-align: center;background: #f2f2f2;font-size: 20px">
                            <?php echo $category2['name'] ?? '' ?>
                        </div>
                        <?php if ($category2['books']): ?>
                            <?php foreach ($category2['books'] as $book): ?>
                                <div style="width: 100%;line-height: 20px;text-align: center;margin-top: 10px">
                                    <a target="_blank"
                                       href="<?php echo $book['path'] ?? '' ?>"><?php echo $book['name'] ?? '' ?></a>
                                </div>
                            <?php endforeach; ?>
                        <?php endif; ?>
                    </div>
                <?php endforeach; ?>
                <div style="clear: both"></div>
            </div>
        <?php endif; ?>
    </div>
<?php endforeach; ?>


<!--<table>
    <tr>
        <th>
            Python
        </th>
    </tr>
    <tr>
        <td>
            <a target="_blank" href="https://u17044800.ctfile.com/fs/17044800-377800928">《Python 3网络爬虫开发实战》.pdf</a>
        </td>
    </tr>
</table>

<table class="mtop50">
    <tr>
        <th>
            PHP
        </th>
    </tr>
    <tr>
        <td>
            <a target="_blank" href="https://u17044800.ctfile.com/fs/17044800-377801197">《Learning PHP设计模式》.pdf</a>
        </td>
    </tr>
</table>

<table class="mtop50">
    <tr>
        <th>
            Redis
        </th>
    </tr>
    <tr>
        <td>
            <a target="_blank" href="https://u17044800.ctfile.com/fs/17044800-377801153">《Redis开发与运维》.pdf</a>
        </td>
    </tr>
</table>

<table class="mtop50">
    <tr>
        <th>
            MySql
        </th>
    </tr>
    <tr>
        <td>
            <a target="_blank" href="https://u17044800.ctfile.com/fs/17044800-377800963">《深入浅出MySQL》.pdf</a>
        </td>
    </tr>
</table>

<table class="mtop50">
    <tr>
        <th>
            Nginx
        </th>
    </tr>
    <tr>
        <td>
            <a target="_blank" href="https://u17044800.ctfile.com/fs/17044800-377801123">《实战Nginx：取代Apache的高性能Web服务器》.pdf</a>
        </td>
    </tr>
</table>

<table class="mtop50">
    <tr>
        <th>
            网络
        </th>
    </tr>
    <tr>
        <td>
            <a target="_blank" href="https://u17044800.ctfile.com/fs/17044800-377800952">《图解HTTP》.pdf (彩色版)</a>
        </td>
    </tr>
</table>-->